var=float(input())

x=[1,2]
y=[0 ,0.693147]
y1=[1,0.5]
result=0
# for i in range(y):
#     tem = 1
#     for j in range(x):
#         if i != j:
#             tem*=((var-x[j])/(x[i]-x[j]))**2
#     tem*=1+2*
#
#     result+=tem
#
# for i in range(y1):

tem1=(var-x[1])/(x[0]-x[1])
tem2=(var-x[0])/(x[1]-x[0])
result+=((1+2*tem2)*tem1*tem1)*y[0]
result+=((1+2*tem1)*tem2*tem2)*y[1]

result+=(var-x[0])*tem1*tem1*y1[0]
result+=(var-x[1])*tem2*tem2*y1[1]






print("%.5f"%result)